package com.vt.admin.api.dto.user.redis;

import lombok.Data;

import java.util.Objects;

/**
 * @Auther: PanZha
 * @Date: 2018/11/1 21:59
 */
@Data
public class UserOrganization {

    private String userId;

    private String organizationId;

    private String name;

    private String parentId;

    private String type;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserOrganization that = (UserOrganization) o;
        return Objects.equals(userId, that.userId) &&
                Objects.equals(organizationId, that.organizationId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(parentId, that.parentId) &&
                Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, organizationId, name, parentId, type);
    }
}
